package com.kingsoft.demo.Observer;

public class ObserverTest {

	public static void main(String[] args){ 
        Watched watched = new Watched(); 
        Watcher watcher = new Watcher(); 
        watched.addObserver(watcher); 
        watched.changeData("abc"); 
        watched.changeData("abcd"); 
        watched.changeData("abcd"); 
        watched.changeData("f"); 
        watched.changeData(null); 
        watched.changeData(null); 
    } 

}
